Skip to content

feat: implement naming engine and inflector#2

Draft
nallenscott wants to merge 6 commits intomainfrom
feat/inflector-and-naming-engine
Draft

feat: implement naming engine and inflector#2
nallenscott wants to merge 6 commits intomainfrom
feat/inflector-and-naming-engine

Conversation

@nallenscott
Copy link
Copy Markdown
Member

@nallenscott nallenscott commented Mar 7, 2026

Replaces operationId-based tool naming with a deterministic path-based naming engine.

How it works

Each path is parsed into typed components (RESOURCE or PARAM), then processed to produce a camelCase tool name:

/repos/{owner}/{repo}/issues/{id}
   |     |       |      |      |
   |    [params - skipped]     |
   |                           |
container                   resource
(skipped)                 singularized
                        -> "getRepoIssue"

A container is a resource that scopes other resources through path parameters.. it's dropped since it does not describe the operation. The remaining resource chain is singularized or pluralized based on position and HTTP method, then abbreviated where applicable.

This generalizes across API conventions:

Path Method Tool name
/repos/{owner}/{repo}/issues GET listRepoIssues
/v1/payment_intents POST createPaymentIntent
/2010-04-01/Accounts/{Sid}/Calls.json GET listCalls
/chat.postMessage POST createChatMsg

Changes

  • Adds inflector.py.. English pluralization/singularization for API resource names
  • Adds tool_naming.py.. ToolNamingEngine generates consistent camelCase tool names from REST paths
  • Adds abbrs.json (mirrored from ocp-registry).. abbreviation dictionary used by the naming engine
  • Updates openapi_parser.py to use ToolNamingEngine instead of normalizing operationId

@nallenscott nallenscott force-pushed the feat/inflector-and-naming-engine branch from 7617cf8 to 466c16d Compare March 7, 2026 16:29
@nallenscott nallenscott changed the title feat: implement naming engine and infector feat: implement naming engine and inflector Mar 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant